#include<iostream>
using namespace std;
#define MAXN 11
#define MAX(x,y)  x>y?x:y
#define MIN(x,y)   x<y?x:y

void maxmin(int arr[],int &max,int &min){
    int len = MAXN;
    if(!len)
        return;
    int i,k,_min,_max;
    if(len%2)
        max = min = arr[0];
    for(i=0;i<(len/2);i++){
        k = 2*i + len%2;
        printf("%d %d\n",k,k+1);
        _min = MIN(arr[k],arr[k+1]);
        _max = MAX(arr[k],arr[k+1]);
        min = MIN(min,_min);
        max = MAX(max,_max);
    }
}

int main(){
    int arr[MAXN] = {7,6,9,11,5,1,2,4,10,8,3};
    int max,min;
    maxmin(arr,max,min);
    printf("%d %d\n",max,min);
}
